Silk Mobile

Table of Contents (Homepage)

Layout Verification Tests

Silk Mobile can quickly and easily validate layouts on a mobile device.
Layout verification helps check that elements on the screen are properly displayed.
There are two parts to verifying layouts:

  1. Defining layout verifications

  2. Running a layout verification

Recommendations for Layout

Each layout validates a single screen at a single state.

  1. Before you start

    • Open the screen you would like to validate

    • Identify the elements that should be validated

  2. While defining a layout

    • Feel free to use the same element in more than 1 rule

    • make sure the relations in a rule cover what you expect

    • use the test button to check your definitions.

  3. After Defining a layout

    • Run the Silk Mobile command Layout, to test your definitions.

Note: A layout is made of a collection of elements and the rules they need to match.
Each rule determines that a group of elements need to have a set of relations.

For Example:

images/lh5.googleusercontent.com/EylR_0S0ih5G4QXwQksY7B1Rg0FmsuSaQ5HSdSxYb-k9liIZM0tJkHYPBDUmsCOFcKh0ONTdvpGFCk3y6mZPWGmNTW0mF1qq3sAFd4CuTlYb-z9yysgSNbWBRMjOfofsYIOAsKUIire-_nMg

The eribank log-in page verification can be as follow:

There are 4 logical elements:

  1. logo

  2. Username field

  3. Password field

  4. Login button

With 2 rules:

  1. the 4 elements match the relations:

    1. exists

  2. the Username and Password fields match the relations:

    1. aligned left

    2. aligned right

    3. have the same height

    4. have the same width

Defining layout verifications

Step 1: Open a reflection and navigate to the target page to validate.

images/lh5.googleusercontent.com/EylR_0S0ih5G4QXwQksY7B1Rg0FmsuSaQ5HSdSxYb-k9liIZM0tJkHYPBDUmsCOFcKh0ONTdvpGFCk3y6mZPWGmNTW0mF1qq3sAFd4CuTlYb-z9yysgSNbWBRMjOfofsYIOAsKUIire-_nMg

Step 2: Open the Properties dialog

images/lh3.googleusercontent.com/GqCwl4rKumxNUQOAWfYHM_BVJriCe9dS82vLd4WMe7Zt-5xXtlDTAvKez8z5dcL9ttP7HWHwasChTnSxX0jAoWpLcNAmAxB8UfCpSQIQPHsJX6DNFIPcFOaaqbyNK00rD3dGn9FxJseUWNSm

Step 3: Open the layout dialog

images/lh3.googleusercontent.com/SuQHC5V063GmA9SLHxnwbG-8sCx-ZrU2rei_Va7NqvOtOxVH3Lz-VqnUGGTNwLNlayiZK-egXTBe-JJ2IZHYL7_0UfJ2Q2Pl8INNJVsANXUgN2M9ahXUDWUhK0mYrVvi9efQzkk-_BzS4e1k

Step 4: Create a layout by clicking the new layout icon,
Give the layout a name and save it.

images/lh6.googleusercontent.com/EwWmFf15IrGriJdZlP9JnNREoIU45zi3Ur8qHxAQF5nqMVVIZ4HtMa5N1WF3xyVM5Vk2YG-HpwqRtCNontnCoQzN4UZJQ1WWzksKptFVcpUhTw6L7DEycJz1eNsCFYI7VBvn0BciARdHUmrj

Step 5: Add Elements to the layout (rename them if you like)

  • From the reflection: right click an element and click add to layout

  • From the properties dialog: right click an element (from table or tree) and click add to layout

  • From the layout dialog: click the icon for new element and write it's xpath manually

images/lh4.googleusercontent.com/N9BRiiCxTrQg9vDR6VqbcMi099pKULsyvLS4VinEejBIb9TT00iat_OjZ82RH08XlYELaqGjSwqtUMM4iD2gd_mwpLrSP6ieP_dFadP7K9isYzOXQoNKuq_JQYxuET4Ex0XXBqxtZDp0HBnk

Step 6: Select elements and right click, select create rule.
Make sure all the elements you need are in the right side and that all relations you want are grayed (pined)

images/lh5.googleusercontent.com/Ke9Sy7JoWTguMASmFx-Tthg0uoKYZZJ7sAyOEoRfq2MmEH3o7ilzf-odJ9KhwWvx6jEjIbvvmEteAOO_jISg7w7ZOI5dA6X3kJBdC8Wn4Eo9_gBMywPVplx9H-4I6wqjJ9jKSHCDl5RX2avy images/lh3.googleusercontent.com/XCsQFlR7YTlYC7Pp8hWB5qGbf1p2T9-73E6yO3qx0Bk8bMoeRIKruWfgoJ_tNMkDJlJdVwnXQQqNWU03JR7Y_yWyLRu8B8pu3MoIDCGgEDiLuM6Nmmhjcsz3L3GbM2Ry4gqjuNyeDnK584PB

Step 7: Save the rule, by clicking OK.

images/lh6.googleusercontent.com/YeWGYa1BrMIbo2JlmevGsKNIza78wSPSzNUGebMcECeE6xFJ69rwaxNe05hiJsmeF8m4YkAMenZUU0_fVPIcPWMDt4r9MUuvOWrvbWNF9HSdHQcudzLuJVPbDjKoHoP9N12ffAcjRH9myomZ

Step 8: Save the layout

Step 9: Test the layout using the play button

images/lh3.googleusercontent.com/LbM0xrEKxEagv1wU3o-NZ5L3DynpZLls7GoQQFOgX_vPGJkwY5MqhOhjH910Fu4b7D4GlHRmw3fit2Bs-7xzp1RzST379us0Bzmj1Jv6zmrUti93nTqITzPBAgszAfMVXiB_5Cw

Step 10: Add the layout to your script by clicking the add to script button.